use super::hitls_type::{HITLS_Config, HITLS_Ctx};
pub const HITLS_ACCEPT_SNI_ERR_OK: u32 = 0;
pub const HITLS_ACCEPT_SNI_ERR_ALERT_FATAL: u32 = 2;
pub const HITLS_ACCEPT_SNI_ERR_NOACK: u32 = 3;
pub const HITLS_SNI_HOSTNAME_TYPE: SNI_Type = 0;
pub const HITLS_SNI_BUTT: SNI_Type = 255;
pub type SNI_Type = ::std::os::raw::c_uint;
unsafe extern "C" {
    pub fn HITLS_GetServerName(
        ctx: *const HITLS_Ctx,
        type_: ::std::os::raw::c_int,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn HITLS_GetServernameType(ctx: *const HITLS_Ctx) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_CFG_SetServerName(
        config: *mut HITLS_Config,
        serverName: *mut u8,
        serverNameStrlen: u32,
    ) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_CFG_GetServerName(
        config: *mut HITLS_Config,
        serverName: *mut *mut u8,
        serverNameStrlen: *mut u32,
    ) -> i32;
}
pub type HITLS_SniDealCb = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: *mut HITLS_Ctx,
        alert: *mut ::std::os::raw::c_int,
        arg: *mut ::std::os::raw::c_void,
    ) -> i32,
>;
unsafe extern "C" {
    pub fn HITLS_CFG_SetServerNameCb(config: *mut HITLS_Config, callback: HITLS_SniDealCb) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_CFG_SetServerNameArg(
        config: *mut HITLS_Config,
        arg: *mut ::std::os::raw::c_void,
    ) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_CFG_GetServerNameCb(
        config: *mut HITLS_Config,
        callback: *mut HITLS_SniDealCb,
    ) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_CFG_GetServerNameArg(
        config: *mut HITLS_Config,
        arg: *mut *mut ::std::os::raw::c_void,
    ) -> i32;
}
